<%@ page import="cn.jee.jsp.Stu" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h3>表单发送过来的数据</h3>
<%
//    HttpServletRequest request
    String username=request.getParameter("username");
//    PrintWriter out,目的地是response
    out.println("你输入的用户名是:"+username);
    String password=request.getParameter("password");
    String gender=request.getParameter("gender");
    String[] movies=request.getParameterValues("movies");
    if(movies!=null){
        for(String movie:movies){
          out.println(movie);
        }
    }
    String[] langs= request.getParameterValues("langs");
    if(langs!=null){
      for(String lang:langs){
        out.println(lang);
      }
    }
    Stu stu=new Stu();
    String strAge=request.getParameter("age");
    int age=Integer.parseInt(strAge);
    stu.setAge(age);
%>
<%=username%>
密码：<%=password%><br>
性别：<%=gender%></br>
通过对象显示: <%=stu.getAge()%>
</body>
</html>
